﻿using System.Globalization;
using System.Threading;

namespace Arch.Common.Data.Resources
{
    public class NullResourceStore : IResourcesStore
    {
        public string Name { get { return "Null"; } set { } }
        
        protected virtual string Format(string key, CultureInfo culture = null)
        {
            if (culture == null) culture = Thread.CurrentThread.CurrentUICulture;
            return string.Format("%{0}:{1}%", key, culture);
        }

        public string Get(string key)
        {
            return Format(key);
        }

        public string Get(string key, CultureInfo culture)
        {
            return Format(key, culture);
        }

        public object GetObject(string key)
        {
            return Format(key);
        }

        public object GetObject(string key, CultureInfo culture)
        {
            return Format(key, culture);
        }

        public void Set(string key, CultureInfo culture, string resource)
        {

        }

        public void SetObject(string key, CultureInfo culture, object resource)
        {

        }
    }
}
